package com.xx.ems.model;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;

/**
 * @author xxx
 * @date 2014-2-25
 * @version 1.0
 * 描述: 领用申请表
 */
@Entity
public class ReceiveApply {
	/**
	 * 描述：主键
	 */
	private Integer uid;
	/**
	 * 描述：用户表关联对象 (申请人)
	 */
	private Users users;
	/**
	 * 描述：申请理由
	 */
	private String reason;
	/**
	 * 描述：申请时间
	 */
	private Date apply_time;
	/**
	 * 描述：申请状态
	 */
	private Integer apply_status;
	
	@Id
	@GeneratedValue(strategy=GenerationType.IDENTITY)
	@Column(name="uid",unique=true,nullable=false)
	public Integer getUid() {
		return uid;
	}
	public void setUid(Integer uid) {
		this.uid = uid;
	}
	@ManyToOne(targetEntity=Users.class)
	@JoinColumn(name="fk_uid")
	public Users getUsers() {
		return users;
	}
	public void setUsers(Users users) {
		this.users = users;
	}
	@Column(name="reason",length=255,nullable=false)
	public String getReason() {
		return reason;
	}
	public void setReason(String reason) {
		this.reason = reason;
	}
	@Column(name="apply_time",nullable=false)
	public Date getApply_time() {
		return apply_time;
	}
	public void setApply_time(Date apply_time) {
		this.apply_time = apply_time;
	}
	@Column(name="apply_status",nullable=false)
	public Integer getApply_status() {
		return apply_status;
	}
	public void setApply_status(Integer apply_status) {
		this.apply_status = apply_status;
	}
}